home *** CD-ROM | disk | FTP | other *** search
/ Programming Sound Cards / Programming Sound Cards.iso / sound_52 / close.ma < prev    next >
Text File  |  1995-01-01  |  1KB  |  54 lines

  1. # test close routine
  2. #
  3. @include \mh\wind.mh
  4.  
  5. # associated storage
  6. uchar x[1]
  7.  
  8. riff openWindows()
  9.     int wd
  10.  
  11.     # open DEFINE window, variable storage must be ??
  12.     # DEFINE window, map a list of "labels", i.e., strings
  13.     # to scalars. Upon input the topmost label is assigned
  14.     # the value 0, to label n-1.
  15.     #    upX,upY
  16.     #    lowX,lowY
  17.     #    title string
  18.     #    nolabels = n, number of input strings
  19.     #    fieldsize = 0    must be 0
  20.     #    nofields = 0    must be 0
  21.     #    pointer to uchar array of size 1
  22.     wd = inputWindow(WDEFINE, 10, 20, 14, 30, "section", 3, 0, 0, &x)
  23.     # enter labels
  24.     void windowLabel(wd, "Asection", 0)
  25.     void windowLabel(wd, "Bsection", 1)
  26.     void windowLabel(wd, "Csection", 2)
  27.  
  28.     # put up debug window to show changes
  29. end
  30.  
  31. vco testit()
  32.     int rval
  33.     int index
  34.     int wh
  35.     int yoffset
  36.  
  37.     wh = outputWindow(WDEBUG,15,0,20,25,"printf") # halfway
  38.      void openWindows()
  39.     yoffset = 5
  40.     for(index = 0; index < 7; index++)
  41.         void printf("x = %d\n",x[0])
  42.         void printf("x = %d\n",x[0])
  43.         void printf("x = %d\n",x[0])
  44.         void printf("x = %d\n",x[0])
  45.         void printf("x = %d\n",x[0])
  46.         void mgetch()
  47.         void closeWindow(wh)
  48.         void mgetch()
  49.         wh = outputWindow(WDEBUG,15,1+yoffset,20,25+yoffset,"printf") # halfway
  50.         yoffset = yoffset + 5
  51.     end
  52. end
  53.  
  54.